# 导入 xtdatacenter 模块



import sys

print("Python 版本：", sys.version)

import time
import pandas as pd
from xtquant import xtdatacenter as xtdc
from xtquant import xtdata
'''  
设置用于登录行情服务的token，此接口应该先于 init_quote 调用
'''
xtdc.set_token('eb96566359984c37488e5a5f7464a393b00fdfb9')

'''
设置连接池
'''
addr_list = ['115.231.218.73:55310', '115.231.218.79:55310', '218.16.123.11:55310', '218.16.123.27:55310']
xtdc.set_allow_optmize_address(addr_list)
"""
初始化

"""
"""
K线全推设置
"""
#xtdc.set_kline_mirror_enabled(True)

xtdc.init()
xtdc.listen(port=58612)
xtdata.connect(port=58612)

print('-----连接上了------')
print(xtdata.data_dir)



servers = xtdata.get_quote_server_status()
# print(servers)
for k, v in servers.items():
    print(k, v)






xtdata.run()